package com.duolaibei.business.view.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.duolaibei.business.R;
import com.duolaibei.business.base.BaseActivity;
import com.duolaibei.business.config.Constant;
import com.duolaibei.business.utils.inject.Inject;

/**
 * Created by xlm on 2017/10/28 0028
 */

public class LoginModeActivity extends BaseActivity {

    @Inject(R.id.login_boss)
    private TextView mTextViewBoss;
    @Inject(R.id.login_worker)
    private TextView mTextViewWorker;
    @Inject(R.id.login_regist)
    private TextView mTextViewRegist;

    @Override
    protected void onSetContentView() {
        setContentView(R.layout.activity_login_mode);
    }

    @Override
    protected void initViews() {

    }

    @Override
    protected void afterOnCreate(Bundle savedInstanceState) {

    }

    @Override
    protected void onSetListener() {
        mTextViewBoss.setOnClickListener(this);
        mTextViewWorker.setOnClickListener(this);
        mTextViewRegist.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        Intent intentLogin = new Intent(getThis(), LoginActivity.class);
        Intent intentRegist = new Intent(getThis(), RegistAndForgetActivity.class);
        switch (v.getId()) {
            case R.id.login_boss:
                intentLogin.putExtra(Constant.LOGIN_MODE, Constant.MODE_BOSS);
                startActivity(intentLogin);
                break;
            case R.id.login_worker:
                intentLogin.putExtra(Constant.LOGIN_MODE, Constant.MODE_WORKER);
                startActivity(intentLogin);
                break;
            case R.id.login_regist:
                intentRegist.putExtra(Constant.LOGIN_MODE, Constant.MODE_REGIST);
                startActivity(intentRegist);
                break;
        }
    }
}
